<?php
/**
 * Created by PhpStorm.
 * User: qixiuxiu
 * Date: 2017/4/7
 * Time: 11:21
 */
namespace Simplex;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\EventDispatcher\Event;
/*
 * 框架每处理一次请求，一个Response
 * ResponseEvent类中包含两个属性和两个成员方法（必须要有返回值的）
 * */
class ResponseEvent extends Event{
    private $request;//声明私有的请求
    private $response;//声明私有的响应

    //写构造方法（没有返回值），为请求和响应赋值
    public function __construct(Response $response,Request $request)
    {
        $this->response = $response;
        $this->request = $request;
    }

    public function getResponse(){
        return $this->response;
    }

    public function getRequest(){
        return $this->request;
    }
}
